<template>
    <el-dialog v-model="show" title="对账详情" width="43%" align-center @close="handleClose">
        <div class="container">

            <el-row>
                <el-col :span="8">
                    收款方名称: 供应商A
                </el-col>
                <el-col :span="8">
                    摘要: 贷款
                </el-col>
                <el-col :span="8">
                    付款状态: <span style="color: #E6A33F;">部分付款</span>
                </el-col>
            </el-row>

            <el-divider />

            <div>
                <div class="list" v-for="itemList in 5">
                    <div class="item" v-for="item in 12" :key="item">
                        申请日期: 2024-12-16
                    </div>
                    <el-divider />
                </div>
            </div>

        </div>
        <template #footer>
            <div class="dialog-footer">
                <el-button type="primary" @click="handleClose">确 定</el-button>
            </div>
        </template>
    </el-dialog>
</template>

<script setup lang="ts">
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const props = defineProps(['visible', 'initList']);
const emits = defineEmits(['submit', 'close']);

const show = ref(false);

watch(() => props.visible, async (newValue) => {
    show.value = newValue
    if (newValue) {
    }
}, { deep: true });


const handleSubmit = async () => {
    proxy?.$modal.msgSuccess('操作成功');
    emits('submit', true);

    handleClose();
};


const handleClose = () => {
    emits('close');
};

onMounted(() => {
})
</script>

<style lang="scss" scoped>
.container {
    width: 100%;
    max-height: 300px;
    overflow-x: auto;
}

.el-col {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.list {
    display: flex;
    flex-wrap: wrap;

    .item {
        margin-bottom: 20px;
        width: 140px;
        margin-right: 10px;
        font-size: 14px;
        font-weight: 500;
        color: #000;
    }
}
</style>